Displacement detection system of an optical touch panel and method thereof

ABSTRACT

At a first time, a first image sensor and a second image sensor capture a first image and a second image including images of an object respectively. At a second time, the first image sensor and the second image sensor capture a third image and a fourth image including images of the object respectively. A coordinate calculation device calculates a first coordinate of the object at the first time according to the first image and the second image, and a second coordinate of the object at the second time according to the third image and the fourth image. A coordinate correction device calculates a displacement between the first time and the second time according to the first coordinate and the second coordinate, and corrects an output coordinate of the object at the second time according to the displacement.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No.61/221,565, filed on Jun. 30, 2009 and entitled “COORDINATE DETECTION OFTOUCH SYSTEM,” the contents of which are incorporated herein byreference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a displacement detection system of anoptical touch panel and method thereof, and more particularly, to adisplacement detection system of an optical touch panel and methodthereof capable of correcting output coordinates according to adisplacement.

2. Description of the Prior Art

A traditional optical touch panel utilizes a light source to light apanel, and an image sensor to capture an image including an image of anobject. The optical touch panel utilizes luminance information of theobject to calculate a center of gravity of the object, so the center ofgravity of the object obtained according to the luminance information ofthe object may be biased to one side of the panel when the object movesacross corners of the panel. In this situation, although the objectmoves straight forward, the image sensor may capture a curved image ofthe object when the object moves across corners of the panel. Pleaserefer to FIG. 1. FIG. 1 is a diagram illustrating the image sensorcapturing the uncorrected image of the object when the object movesacross corners of the panel. As shown in FIG. 1, the center of gravityof the object obtained according to the luminance information of theobject may be biased to one side of the panel because the object movesfrom a light/dark area to a light/dark area of the panel.

The prior art utilizes a center of the object to calculate shadow pointsfor improving the above mentioned situation. But quality ofinterpolation calculation is poor in the prior art utilizing the centerof the object, and may result in sawtooth images appearing when theobject moves slowly.

SUMMARY OF THE INVENTION

An embodiment of the present invention provides a displacement detectionsystem of an optical touch panel. The displacement detection systemcomprises a panel, at least one first image sensor and a second imagesensor, a coordinate calculation device, and a coordinate correctiondevice. The panel is used for being touched by an object. The firstimage sensor and the second image sensor are installed on differentpositions of the panel, and view of the first image sensor and view ofthe second image sensor are overlapped. The coordinate calculationdevice is used for utilizing the first image sensor and the second imagesensor to capture a first image and a second image including images ofthe object respectively at a first time, utilizing image positions ofthe object in the first image and the second image to calculate a firstcoordinate of the object at the first time, utilizing the first imagesensor and the second image sensor to capture a third image and a fourthimage including images of the object respectively at a second time, andutilizing image positions of the object in the third image and thefourth image to calculate a second coordinate of the object at thesecond time. The coordinate correction device is used for calculating adisplacement of the object between the first time and the second timeaccording to the first coordinate and the second coordinate, and forcorrecting an output coordinate of the object at the second timeaccording to the displacement.

Another embodiment of the present invention provides a displacementdetection method of an optical touch panel. The displacement detectionmethod comprises capturing a first image including an object by a firstimage sensor and a second image including the object by a second imagesensor on a panel at a first time; capturing a third image including theobject by the first image sensor and a fourth image including the objectby the second image sensor on the panel at a second time; calculating afirst coordinate of the object at the first time according to imagepositions of the object in the first image and the second image;calculating a second coordinate of the object at the second timeaccording to image positions of the object in the third image and thefourth image; calculating a displacement of the object between the firsttime and the second time according to the first coordinate and thesecond coordinate; correcting an output coordinate of the object at thesecond time according to the displacement.

Another embodiment of the present invention provides a displacementdetection system of an optical touch panel. The displacement detectionsystem comprises a panel, at least one first image sensor and a secondimage sensor, a coordinate calculation device, and a coordinatecorrection device. The panel is used for being touched by an object. Thefirst image sensor and the second image sensor are installed ondifferent positions of the panel, and view of the first image sensor andview of the second image sensor are overlapped. The coordinatecalculation device is used for saving an initial coordinate of theobject on the panel at an initial time, utilizing the first image sensorand the second image sensor to capture a first image and a second imageincluding images of the object respectively at a first time, andutilizing image positions of the object in the first image and thesecond image to calculate a first coordinate of the object at the firsttime. And the coordinate correction device is used for calculating adisplacement of the object between the initial time and the first timeaccording to the initial coordinate and the first coordinate, and forcorrecting an output coordinate of the object at the first timeaccording to the displacement.

The present invention provides a displacement detection system of anoptical touch panel and method thereof. The displacement detectionsystem of an optical touch panel and method thereof generate an adaptingsmoothing parameter according to a displacement of an object between twodifferent time points. Then, based on a relationship between a velocityof the object and an image position at the last time is reverse, thepresent invention utilizes the adapting smoothing parameter to givedifferent weighted values to the image positions of the two differenttime points. Therefore, a moving trace of the object corrected by theweighted values may not be influenced when the object moves from thelight/dark area to the light/dark area of the panel.

These and other objectives of the present invention will no doubt becomeobvious to those of ordinary skill in the art after reading thefollowing detailed description of the preferred embodiment that isillustrated in the various figures and drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating the image sensor capturing theuncorrected image of the object when the object moves across corners ofthe panel.

FIG. 2 is a diagram illustrating a displacement detection system of anoptical touch panel according to an embodiment of the present invention.

FIG. 3 is a diagram illustrating a displacement detection system of anoptical touch panel according to another embodiment of the presentinvention.

FIG. 4 is a flowchart illustrating a displacement detection method of anoptical touch panel according to another embodiment of the presentinvention.

DETAILED DESCRIPTION

Please refer to FIG. 2. FIG. 2 is a diagram illustrating a displacementdetection system 200 of an optical touch panel according to anembodiment of the present invention. The displacement detection system200 comprises a panel 202, a first light source 204, a second lightsource 206, a first image sensor 208, a second image sensor 210, acoordinate calculation device 212, a smoothing parameter generatingdevice 214, and a coordinate correction device 216. The panel 202 isused for being touched by an object. The first light source 204 and thesecond light source 206 are used for lighting the panel 202. The firstimage sensor 208 and the second image sensor 210 are installed ondifferent positions of the panel 202, and view of the first image sensor208 and view of the second image sensor 210 are overlapped. At a firsttime, the first image sensor 208 and the second image sensor 210 capturea first image and a second image including images of the objectrespectively, and at a second time, the first image sensor 208 and thesecond image sensor 210 capture a third image and a fourth imageincluding images of the object respectively. The coordinate calculationdevice 212 is coupled to the first image sensor 208 and the second imagesensor 210 for using image positions of the object in the first imageand the second image to calculate a first coordinate D1 of the object atthe first time, and using image positions of the object in the thirdimage and the fourth image to calculate a second coordinate D2 of theobject at the second time. The coordinate correction device 216 iscoupled to the coordinate calculation device 212 for calculating adisplacement Z of the object between the first time and the second timeaccording to the first coordinate D1 and the second coordinate D2.

The smoothing parameter generating device 214 is coupled to thecoordinate correction device 216 for substituting the displacement Zinto equation (1) to generate an adaptive smoothing parameter λ:

$\begin{matrix}{{\lambda = {k\frac{1}{\sqrt{\left( {{y_{i}(t)} - {y_{o}\left( {t - 1} \right)}} \right)^{2} + \left( {{x_{i}(t)} - {x_{o}\left( {t - 1} \right)}} \right)^{2}}}}},\mspace{14mu}{0 \leq \lambda \leq 1}} & (1)\end{matrix}$where k is an adaptive smoothing constant, y_(i)(t) is an uncorrected ycoordinate of the object at the second time, y_(o)(t−1) is a corrected ycoordinate of the object at the first time, x_(i)(t) is an uncorrected xcoordinate of the object at the second time, and x_(o)(t−1) is acorrected x coordinate of the object at the first time.

According to the adaptive smoothing parameter λ, the coordinatecorrection device 216 corrects the image positions of the object in thefirst image and the second image to obtain a first weighted imageposition (λx_(o)(t−1), λy_(o)(t−1)), and corrects the image positions ofthe second third image and the fourth image to obtain a second weightedimage position ((1−λ)x_(i)(t), (1−λ)y_(i)(t)). Then, the coordinatecorrection device 216 calculates the output coordinate (x_(o)(t),y_(o)(t)) at the second time according to the first weighted image(λx_(o)(t−1), λy_(o)(t−1)) position, the second weighted image position((1−λ)x_(i)(t), (1−λ) y_(i)(t)), and equations (2):y _(o)(t)=(1−λ)y _(i)(t)+λy _(o)(t−1)x _(o)(t)=(1−λ)x _(i)(t)+λx _(o)(t−1)  (2)where y_(o)(t) is a corrected y coordinate of the object at the secondtime, and x_(o)(t) is a corrected x coordinate of the object at thesecond time. A concept of using the adaptive smoothing parameter λ tocorrect image positions of the object to obtain the weighted imageposition is based on correlation between position of the object andimage position at the last time being low/high if the object movesfast/slow. Therefore, a relationship between the adaptive smoothingparameter λ and a velocity of the object is reverse according to theequation (1) and the abovementioned concept. A weighted value for theimage position of the first time is λ and a weighted value for the imageposition of the second time is 1−λ.

Please refer to FIG. 3. FIG. 3 is a diagram illustrating a displacementdetection system 300 of an optical touch panel according to anotherembodiment of the present invention. The displacement detection system300 uses the coordinate calculation device 212 to save initialcoordinate C0 of the object on the panel 202 at an initial time. Thecoordinate calculation device 212 uses the first image sensor 208 andthe second image sensor 210 to capture a first image and a second imageincluding images of the object respectively at a first time, and usesimage positions of the object in the first image and the second image tocalculate first coordinate C1 of the object at the first time. Thecoordinate correction device 212 calculates a displacement Z1 of theobject between the initial time and the first time according to theinitial coordinate C0 and the first coordinate C1. After obtaining thedisplacement Z1, subsequent operation steps of the displacementdetection system 300 are the same as for the displacement detectionsystem 200, so further description thereof is omitted for simplicity. Itshould be noted that, the initial coordinate C0 is an uncorrectedcoordinate but D1 in FIG. 2 is a corrected coordinate.

Step 414: The coordinate correction device 216 corrects an outputcoordinate of the object at the second time according adaptive smoothingparameter λ.

Please refer to FIG. 3. FIG. 3 is a diagram illustrating a displacementdetection system 300 of an optical touch panel according to anotherembodiment of the present invention. The displacement detection system300 uses the coordinate calculation device 212 to save initialcoordinate C0 of the object on the panel 202 at an initial time. Thecoordinate calculation device 212 uses the first image sensor 208 andthe second image sensor 210 to capture a first image and a second imageincluding images of the object respectively at a first time, and usesimage positions of the object in the first image and the second image tocalculate first coordinate C1 of the object at the first time. Thecoordinate correction device 212 calculates a displacement Z1 of theobject between the initial time and the first time according to theinitial coordinate C0 and the first coordinate C1. After obtaining thedisplacement Z1, subsequent operation steps of the displacementdetection system 300 are the same as for the displacement detectionsystem 200, so further description thereof is omitted for simplicity.

Please refer to FIG. 4. FIG. 4 is a flowchart illustrating adisplacement detection method of an optical touch panel according toanother embodiment of the present invention. FIG. 4 uses thedisplacement detection system 200 in FIG. 2 to illustrate the method.

Detailed Steps are as Follows:

Step 400: Start.

Step 402: At the first time, the first image sensor 208 captures thefirst image including the object on the panel 202, and the second imagesensor 210 captures the second image including the object on the panel202.

Step 404: At the second time, the first image sensor 208 captures thethird image including the object on the panel 202, and the second imagesensor 210 captures the fourth image including the object on the panel202.

Step 406: The coordinate calculation device 212 calculates the firstcoordinate D1 of the object at the first time according to imagepositions of the object in the first image and the second image.

Step 408: The coordinate calculation device 212 calculates the secondcoordinate D2 at the second time according to image positions of theobject in the third image and the fourth image.

Step 410: The coordinate correction device 216 calculates thedisplacement Z of the object between the first time and the second timeaccording to the first coordinate D1 and the second coordinate D2.

Step 412: The smoothing parameter generating device 214 generates theadaptive smoothing parameter λ according to the displacement Z.

Step 414: The coordinate correction device 216 corrects the imagepositions of the object in the third image and the fourth imageaccording to the adaptive smoothing parameter λ.

Step 416: End.

To sum up, the displacement detection system of an optical touch paneland method thereof provided by the present invention generate theadaptive smoothing parameter according to the displacement between twodifferent time points. Then, based on the correlation between theposition of the object and the image position at the last time beinglow/high if the object moves fast/slow, the present invention utilizesthe adaptive smoothing parameter to give different weighted values tothe image positions of the two different time points. Therefore, amoving trace of the object corrected by the weighted values may not beinfluenced when the object moves from the light/dark area to thelight/dark area of the panel.

Those skilled in the art will readily observe that numerousmodifications and alterations of the device and method may be made whileretaining the teachings of the invention. Accordingly, the abovedisclosure should be construed as limited only by the metes and boundsof the appended claims.

1. A displacement detection system of an optical touch panel,comprising: a panel for being touched by an object; at least one firstimage sensor and a second image sensor, wherein the first image sensorand the second image sensor are installed on different positions of thepanel, and view of the first image sensor and view of the second imagesensor are overlapped; a coordinate calculation device for utilizing thefirst image sensor and the second image sensor to capture a first imageand a second image including images of the object respectively at afirst time, utilizing image positions of the object in the first imageand the second image to calculate a first coordinate of the object atthe first time, utilizing the first image sensor and the second imagesensor to capture a third image and a fourth image including images ofthe object respectively at a second time, and using image positions ofthe object in the third image and the fourth image to calculate a secondcoordinate of the object at the second time; and a coordinate correctiondevice for calculating a displacement of the object between the firsttime and the second time according to the first coordinate and thesecond coordinate, and for correcting an output coordinate of the objectat the second time according to the displacement.
 2. The displacementdetection system of claim 1, further comprising a light source forlighting the panel.
 3. The displacement detection system of claim 1,wherein the coordinate correction device corrects the image positions ofthe object in the first image and the second image according to thedisplacement to obtain a first weighted image position, corrects theimage positions of the object in the third image and the fourth imageaccording to the displacement to obtain a second weighted imageposition, and calculates the output coordinate according to the firstweighted image position and the second weighted image position.
 4. Thedisplacement detection system of claim 1, further comprising a smoothingparameter generating device for generating an adaptive smoothingparameter according to the displacement and the following equation:${\lambda = {k\frac{1}{\sqrt{\left( {{y_{i}(t)} - {y_{o}\left( {t - 1} \right)}} \right)^{2} + \left( {{x_{i}(t)} - {x_{o}\left( {t - 1} \right)}} \right)^{2}}}}},\mspace{14mu}{{0 \leq \lambda \leq 1};}$wherein λ is the adaptive smoothing parameter; k is an adaptivesmoothing constant; y_(i)(t) is an uncorrected y coordinate of theobject at the second time; y_(o)(t−1) is a corrected y coordinate of theobject at the first time; x_(i)(t) is an uncorrected x coordinate of theobject at the second time; and x_(o)(t−1) is a corrected x coordinate ofthe object at the first time; wherein the coordinate correction devicecorrects the output coordinate at the second time according to theadaptive smoothing parameter.
 5. The displacement detection system ofclaim 4, wherein the operation that the coordinate correction devicecorrects the output coordinate at the second time according to theadaptive smoothing parameter is according to the following equations:y _(o)(t)=(1−λ)y _(i)(t)+λy _(o)(t−1);x _(o)(t)=(1−λ)x _(i)(t)+λx _(o)(t−1); wherein y_(o)(t) is a corrected ycoordinate of the object at the second time; and x_(o)(t) is a correctedx coordinate of the object at the second time.
 6. A displacementdetection method of an optical touch panel, comprising: capturing afirst image including an object by a first image sensor and a secondimage including the object by a second image sensor on a panel at afirst time; capturing a third image including the object by the firstimage sensor and a fourth image including the object by the second imagesensor on the panel at a second time; calculating a first coordinate ofthe object at the first time according to image positions of the objectin the first image and the second image; calculating a second coordinateof the object at the second time according to image positions of theobject in the third image and the fourth image; calculating adisplacement of the object between the first time and the second timeaccording to the first coordinate and the second coordinate; andcorrecting an output coordinate of the object at the second timeaccording to the displacement.
 7. The displacement detection method ofclaim 6, wherein correcting the output coordinate of the object at thesecond time according to the displacement comprises: correcting theimage positions of the object in the first image and the second imageaccording to the displacement to obtain a first weighted image position;correcting the image positions of the object in the third image and thefourth image according to the displacement to obtain a second weightedimage position; and correcting the output coordinate according to thefirst weighted image position and the second weighted image position. 8.The displacement detection method of claim 6, further comprisinggenerating an adaptive smoothing parameter according to the displacementand the following equation, and correcting the output coordinate at thesecond time according to the adaptive smoothing parameter:${\lambda = {k\frac{1}{\sqrt{\left( {{y_{i}(t)} - {y_{o}\left( {t - 1} \right)}} \right)^{2} + \left( {{x_{i}(t)} - {x_{o}\left( {t - 1} \right)}} \right)^{2}}}}},\mspace{14mu}{{0 \leq \lambda \leq 1};}$wherein λ is the adaptive smoothing parameter; k is an adaptivesmoothing constant; y_(i) (t) is an uncorrected y coordinate of theobject at the second time; y_(o)(t−1) is a corrected y coordinate of theobject at the first time; x_(i) (t) is an uncorrected x coordinate ofthe object at the second time; and x_(o)(t−1) is a corrected xcoordinate of the object at the first time.
 9. The displacementdetection method of claim 8, wherein correcting the output coordinate atthe second time according to the adaptive smoothing parameter isperformed according to the following equations:y _(o)(t)=(1−λ)y _(i)(t)+λy _(o)(t−1);x _(o)(t)=(1−λ)x _(i)(t)+λx _(o)(t−1); wherein y_(o)(t) is a corrected ycoordinate of the object at the second time; and x_(o)(t) is a correctedx coordinate of the object at the second time.
 10. A displacementdetection system of an optical touch panel, comprising: a panel forbeing touched by an object; at least one first image sensor and a secondimage sensor, wherein the first image sensor and the second image sensorare installed on different positions of the panel, and view of the firstimage sensor and view of the second image sensor are overlapped; acoordinate calculation device for saving an initial coordinate of theobject on the panel at an initial time, utilizing the first image sensorand the second image sensor to capture a first image and a second imageincluding images of the object respectively at a first time, andutilizing image positions of the object in the first image and thesecond image to calculate a first coordinate of the object at the firsttime; and a coordinate correction device for calculating a displacementof the object between the initial time and the first time according tothe initial coordinate and the first coordinate, and for correcting anoutput coordinate of the object at the first time according to thedisplacement.
 11. The displacement detection system of claim 10, furthercomprising a smoothing parameter generating device for generating anadapting smoothing parameter according to the displacement and thefollowing equation, and for correcting the output coordinate at thefirst time according to the adaptive smoothing parameter:${\lambda = {k\frac{1}{\sqrt{\left( {{y_{i}(t)} - {y_{o}\left( {t - 1} \right)}} \right)^{2} + \left( {{x_{i}(t)} - {x_{o}\left( {t - 1} \right)}} \right)^{2}}}}},\mspace{14mu}{{0 \leq \lambda \leq 1};}$wherein λ is the adaptive smoothing parameter; k is an adaptivesmoothing constant; y_(i)(t) is an uncorrected y coordinate of theobject at the first time; y_(o)(t−1) is a y coordinate of the object atthe first initial time; x_(i)(t) is an uncorrected x coordinate of theobject at the first time; and x_(o)(t−1) is a x coordinate of the objectat the initial time.
 12. The displacement detection system of claim 11,wherein the operation that the coordinate correction device corrects anoutput coordinate of the object at the first time according to thedisplacement is performed according to the following equations:y _(o)(t)=(1−λ)y _(i)(t)+λy _(o)(t−1);x _(o)(t)=(1−λ)x _(i)(t)+λx _(i)(t−1); wherein y_(o)(t) is a corrected ycoordinate of the object at the end first time; and x_(o)(t) is acorrected x coordinate of the object at the first time.